Title: x86assembly - ch1 - overview
Tags: ch1 binary data-representation

Q: Microsoft Macro Assembler is also known as [...] and is included with most versions of Visual Studio.
A: MASM
topic: chapter1

An assembler is a utility program that converts source code programs from assembly language into machine language. A linker is a utility program that combines individual files created by an assembler into a single executable program. A debugger lets you step through a program while it's running and examine registers and memory.
extra info: chapter1

Machine language is a numeric language understood by a computer's processor. All x86 processors understand a common machine language. Assembly language consists of statements written with short mnemonics such as ADD, MOVE, CALL. Assembly language has a one-to-one relationship with machine language; each assembly language instruction corresponds to a single machine language instruction.
topic: chapter1

Q: [...] are named storage locations in the CPU that hold [...] results of operations.
A: Registers; intermediate
extra info: chapter1

Q: The instructions in assembly language may directly match the computer's architecture or they may be translated during execution by a [...] [...].
A: microcode; interpreter
topic: chapter1

Q: A virtual machine layer can transmit instructions to a lower layer through either [...] or [...].
A: interpretation; translation
Topic: chapter1

Q: A [...] [...] in the context of this course is a language layer and can be either hardware or software based.
A: virtual; machine
Topic: chapter1

The first level and which a user could theoretically write a program is Virtual Machine Level 2, also called Instruction Set Architecture (ISA), although the programs consist of binary values called machine language.
Topic: chapter1

The instruction set architecture which computer chip manufacturers design into the processor to carry out basic operations, such as move, add, or multiply is called machine language. Each machine language instruction is either executed directly by the hardware or a program embedded in the microprocessor chip called a microprogram.
Topic: chapter1

Above the ISA level is Assembly Language, at Level 3. Assembly Language programs are translated in their entirety into machine language before they begin to execute.
Topic: chapter1

The most significant bit (MSB) is the bit on the left. The least signifigant bit (LSB) is the bit on the right.
Topic: chapter1 - binary

The basic storage unit for an x86 is a byte, containing 8 bits. A word  contains 2 bytes. A doubleword contains 4 bytes. A quadword contains 8 bytes. A double quadword contains 16 bytes.
Topic: chapter1

A kilobyte is equal to \(2^{10}\), or 1024 bytes.
A megabyte is equal to \(2^{20}\), or 1,048,576 bytes.
A gigabyte is equal to \(2^{30}\), or 1,073,741,824 bytes.
A terabyte is equal to \(2^{40}\), or 1,099,511,627,776 bytes.
A petabyte is equal to \(2^{50}\) bytes.
An exabyte is equal to \(2^{60}\) bytes.
A zettabyte is equal to \(2^{70}\) bytes.
A yottabyte is equal to \(2^{80}\) bytes.
Topic: chapter1 - storage sizes

The decimal number 10 can be represented as 1010 in binary and A in hexadecimal. The number 15 can be represented as 1111 in binary and F in hexadecimal. The number 16 can be represented as 10000 in binary and 10 in hexadecimal.
Topic: chapter1 - binary

Signed binary integers are positive or negative. The most significant bit determines sign. 0 is positive and 1 is negative. To flip the sign of a binary number using two-s complement, invert every bit and add 1.
Topic: chapter1 - binary

Q: A signed integer of n bits uses only n-[...] bits to represent the numbers magnitude. So a signed byte ranges in value from [...] to [...]
A: 1; \(-2^7\); \(+2^7 - 1\)
Topic: chapter1 - binary

The original character set used only 8 bits. That set was called ASCII. ASCII used only 7 of those bits and the extra bit was used by computers to create a proprietary character set.
Topic: chapter1- characters

Q: The [...] 8-bit character set was used in early versions of Microsoft Windows.
A: ANSI
Topic: chapter1 - characters

The standard for character representation today is Unicode. It can render characters for all major languages. UTF-8 is used in HTML and has the same byte values as ASCII. UTF-16 balances efficient character access with economical access to storage. UTF-32 is used where space is no concern and fixed-width characters are required.
Topic: chapter1 - characters

A sequence of one more characters is called a string. An ASCII string is stored as a succession of bytes containing ASCII codes. A null-terminated string ends with a single byte containing zero. (0000000) Many windows system functions require strings to be null-terminated.
Topic: strings

ASCII characters between 0 through 31 are called ASCII control characters.
8 is backspace - moves one column left.
9 is Horizontal tab
10 - Line Feed
12 - Form feed (next printer page)
13 - Carriage Return
27 - Escape character
Topic: chapter1 - characters